\(\int \frac {\sec (e+f x)}{a+b \sec ^2(e+f x)} \, dx\) [182]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 36 \[ \int \frac {\sec (e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{\sqrt {a} \sqrt {a+b} f} \]

[Out]

arctanh(sin(f*x+e)*a^(1/2)/(a+b)^(1/2))/f/a^(1/2)/(a+b)^(1/2)

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {4232, 214} \[ \int \frac {\sec (e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{\sqrt {a} f \sqrt {a+b}} \]

[In]

Int[Sec[e + f*x]/(a + b*Sec[e + f*x]^2),x]

[Out]

ArcTanh[(Sqrt[a]*Sin[e + f*x])/Sqrt[a + b]]/(Sqrt[a]*Sqrt[a + b]*f)

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 4232

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fr
eeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[ExpandToSum[b + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 - ff^2*x^2)^
((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n
/2] && IntegerQ[p]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{a+b-a x^2} \, dx,x,\sin (e+f x)\right )}{f} \\ & = \frac {\text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{\sqrt {a} \sqrt {a+b} f} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00 \[ \int \frac {\sec (e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\text {arctanh}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{\sqrt {a} \sqrt {a+b} f} \]

[In]

Integrate[Sec[e + f*x]/(a + b*Sec[e + f*x]^2),x]

[Out]

ArcTanh[(Sqrt[a]*Sin[e + f*x])/Sqrt[a + b]]/(Sqrt[a]*Sqrt[a + b]*f)

Maple [A] (verified)

Time = 0.22 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.78

method result size
derivativedivides \(\frac {\operatorname {arctanh}\left (\frac {a \sin \left (f x +e \right )}{\sqrt {a \left (a +b \right )}}\right )}{f \sqrt {a \left (a +b \right )}}\) \(28\)
default \(\frac {\operatorname {arctanh}\left (\frac {a \sin \left (f x +e \right )}{\sqrt {a \left (a +b \right )}}\right )}{f \sqrt {a \left (a +b \right )}}\) \(28\)
risch \(\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right )}{2 \sqrt {a^{2}+a b}\, f}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right )}{2 \sqrt {a^{2}+a b}\, f}\) \(102\)

[In]

int(sec(f*x+e)/(a+b*sec(f*x+e)^2),x,method=_RETURNVERBOSE)

[Out]

1/f/(a*(a+b))^(1/2)*arctanh(a*sin(f*x+e)/(a*(a+b))^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 117, normalized size of antiderivative = 3.25 \[ \int \frac {\sec (e+f x)}{a+b \sec ^2(e+f x)} \, dx=\left [\frac {\log \left (-\frac {a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {a^{2} + a b} \sin \left (f x + e\right ) - 2 \, a - b}{a \cos \left (f x + e\right )^{2} + b}\right )}{2 \, \sqrt {a^{2} + a b} f}, -\frac {\sqrt {-a^{2} - a b} \arctan \left (\frac {\sqrt {-a^{2} - a b} \sin \left (f x + e\right )}{a + b}\right )}{{\left (a^{2} + a b\right )} f}\right ] \]

[In]

integrate(sec(f*x+e)/(a+b*sec(f*x+e)^2),x, algorithm="fricas")

[Out]

[1/2*log(-(a*cos(f*x + e)^2 - 2*sqrt(a^2 + a*b)*sin(f*x + e) - 2*a - b)/(a*cos(f*x + e)^2 + b))/(sqrt(a^2 + a*
b)*f), -sqrt(-a^2 - a*b)*arctan(sqrt(-a^2 - a*b)*sin(f*x + e)/(a + b))/((a^2 + a*b)*f)]

Sympy [F]

\[ \int \frac {\sec (e+f x)}{a+b \sec ^2(e+f x)} \, dx=\int \frac {\sec {\left (e + f x \right )}}{a + b \sec ^{2}{\left (e + f x \right )}}\, dx \]

[In]

integrate(sec(f*x+e)/(a+b*sec(f*x+e)**2),x)

[Out]

Integral(sec(e + f*x)/(a + b*sec(e + f*x)**2), x)

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.39 \[ \int \frac {\sec (e+f x)}{a+b \sec ^2(e+f x)} \, dx=-\frac {\log \left (\frac {a \sin \left (f x + e\right ) - \sqrt {{\left (a + b\right )} a}}{a \sin \left (f x + e\right ) + \sqrt {{\left (a + b\right )} a}}\right )}{2 \, \sqrt {{\left (a + b\right )} a} f} \]

[In]

integrate(sec(f*x+e)/(a+b*sec(f*x+e)^2),x, algorithm="maxima")

[Out]

-1/2*log((a*sin(f*x + e) - sqrt((a + b)*a))/(a*sin(f*x + e) + sqrt((a + b)*a)))/(sqrt((a + b)*a)*f)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.06 \[ \int \frac {\sec (e+f x)}{a+b \sec ^2(e+f x)} \, dx=-\frac {\arctan \left (\frac {a \sin \left (f x + e\right )}{\sqrt {-a^{2} - a b}}\right )}{\sqrt {-a^{2} - a b} f} \]

[In]

integrate(sec(f*x+e)/(a+b*sec(f*x+e)^2),x, algorithm="giac")

[Out]

-arctan(a*sin(f*x + e)/sqrt(-a^2 - a*b))/(sqrt(-a^2 - a*b)*f)

Mupad [B] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.78 \[ \int \frac {\sec (e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\mathrm {atanh}\left (\frac {\sqrt {a}\,\sin \left (e+f\,x\right )}{\sqrt {a+b}}\right )}{\sqrt {a}\,f\,\sqrt {a+b}} \]

[In]

int(1/(cos(e + f*x)*(a + b/cos(e + f*x)^2)),x)

[Out]

atanh((a^(1/2)*sin(e + f*x))/(a + b)^(1/2))/(a^(1/2)*f*(a + b)^(1/2))